-
Notifications
You must be signed in to change notification settings - Fork 619
[SDK] Options to custonize ViewAssets's tabs #5126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: c621c13 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
size-limit report 📦
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5126 +/- ##
=======================================
Coverage 45.36% 45.37%
=======================================
Files 1067 1067
Lines 55433 55450 +17
Branches 3991 3991
=======================================
+ Hits 25148 25161 +13
- Misses 29594 29598 +4
Partials 691 691
*This pull request uses carry forward flags. Click here to find out more.
|
gregfromstl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should make this change. It's incredibly niche and if they want this level of customization they should probably be building their own UI. It'll also break as soon as we add another tab to this screen.
packages/thirdweb/src/react/core/hooks/connection/ConnectButtonProps.ts
Outdated
Show resolved
Hide resolved
|
We were having a discussion here: https://linear.app/thirdweb/issue/CNCT-2036/feedbackfeature-request-on-nfts-tab |
20663a1 to
5486d5e
Compare
5486d5e to
336eb86
Compare
782a86a to
8b87882
Compare
Okay I guess I'm overruled then |
Merge activity
|
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on enhancing the `ConnectButton` component by allowing customization of the asset tab display order in the "View Assets" section. Users can now specify whether to show the "Tokens" or "NFTs" tab first, and an empty array will hide the "View Funds" button.
### Detailed summary
- Added `assetTabs` prop to `ConnectButton` for customizing asset tab order.
- Updated `ViewAssets` to dynamically render tabs based on `assetTabs` prop.
- Modified `DetailsModal` to conditionally display "View Funds" button based on `assetTabs` length.
- Enhanced documentation with instructions for using the new feature.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
8b87882 to
dd8c382
Compare
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR introduces the ability to customize the display order of asset tabs in the `ConnectButton` component, allowing users to prioritize "NFTs" over "Tokens". It also includes updates to the documentation and type definitions to support this feature.
### Detailed summary
- Added customization for asset tab order in `ConnectButton`.
- Default order shows "Tokens" first; can be changed to `["nft", "token"]`.
- Updated type definitions to include `assetTabs` in `ConnectButtonProps`.
- Modified `ViewAssets` to dynamically render tabs based on `assetTabs`.
- Documentation updated to reflect changes in tab customization.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
dd8c382 to
c621c13
Compare

Problem solved
Short description of the bug fixed or feature added
PR-Codex overview
This PR introduces a feature to customize the display order of asset tabs in the
ConnectButtoncomponent, allowing users to prioritize "NFTs" or "Tokens". It also includes updates to related components and documentation.Detailed summary
ConnectButton.ViewAssetsto dynamically set active tab based onassetTabsprop.DetailsModalto hide the "View Funds" button ifassetTabsis an empty array.